<?php defined('SYSPATH') or die('No direct script access.');
/*
 * jQuery File Upload Plugin PHP Example 5.2.7
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://creativecommons.org/licenses/MIT/
 */

class Json_Output
{
    function __construct() {
    }

	static function write($json)
	{
		/*
		if(extension_loaded('zlib')){
			ob_start('ob_gzhandler');
		}
		 */
		header ("cache-control: must-revalidate");
		header('Content-Type:application/json; charset=utf-8');
		echo json_encode($json);
		/*
		if(extension_loaded("zlib")){
			ob_end_flush();//输出buffer中的内容
		}
		exit;
		 */
	}
			
}
